package com.cbs.bluetooth.device.qunsuo;

/**
 * Created by broche on 10/10/15.
 */
public enum PrintState {
    Waiting(-1),
    Initing(0),
    Connecting(1),
    Connecting2(2),
    Connecting3(3),
    Printing(4),
    Finishing(5),
    Canceling(6);

    private int value = 0;

    PrintState(int value) {
        this.value = value;
    }

    public int value() {
        return this.value;
    }

    public static PrintState valueOf(int value) {
        switch (value) {
            case -1:
                return Waiting;
            case 0:
                return Initing;
            case 1:
                return Connecting;
            case 2:
                return Connecting2;
            case 3:
                return Connecting3;
            case 4:
                return Printing;
            case 5:
                return Finishing;
            case 6:
                return Canceling;
            default:
                return Initing;
        }
    }
}
